#ifndef PROGRAM_PARSER_CONFIGURATION_H
#define PROGRAM_PARSER_CONFIGURATION_H

#define PARSER_OBJECT_TYPE_GENERIC_EXCEPTION -2
#define PARSER_OBJECT_TYPE_GENERIC_ERROR -1
#define PARSER_OBJECT_TYPE_GENERIC_SUCCESS 0

#define PARSER_OBJECT_DATA_INDEX_TYPE 1
#define PARSER_OBJECT_DATA_CONDITION 2
#define PARSER_OBJECT_DATA_MODIFIED 3
#define PARSER_OBJECT_DATA_USES 4
#define PARSER_OBJECT_DATA_PROCEDURE_NAME 5
#define PARSER_OBJECT_DATA_PROGRAM_LEVEL 6

#define PARSER_OBJECT_TYPE_ASSIGN 1000
#define PARSER_OBJECT_TYPE_CALL 1001
#define PARSER_OBJECT_TYPE_IF_THEN 1002
#define PARSER_OBJECT_TYPE_PROCEDURE 1003
#define PARSER_OBJECT_TYPE_WHILE 1004
#define PARSER_OBJECT_TYPE_ELSE 1005
#define PARSER_OBJECT_TYPE_CLOSURE 1006

#define N_KEYWORDS 6
#define KEYWORD_CALL "call"
#define KEYWORD_IF "if"
#define KEYWORD_PROCEDURE "procedure"
#define KEYWORD_WHILE "while "
#define KEYWORD_ELSE "else"
#define KEYWORD_THEN "then"

/** This test consists of a program written such that curly
braces are always on the same line as their parent statements
or last child statement.
*/
#define PROGRAM_PARSER_TEST_CONSISTENCY_1 "procedure First {\
	x = 2;\
	z = 3;\
	call Second; }\
procedure Second{\
	x = 0;\
	i = 5;\
	while i{\
		x = x + 2 * y;\
		if x then{\
			if y then{ }\
		call Second; }\
		call Third;\
		i = i - 1; }\
	if x then{\
		x = x + 1; } else {\
		z = 1;\
	}\
	z = z + x + i;\
	y = z + 2;\
	x = x * y + z; }\
procedure Third{\
	z = 5;\
	v = z; }"

/** This test consists of a program written such that curly
braces are always on a new line as their parent statements
or last child statement.
*/
#define PROGRAM_PARSER_TEST_CONSISTENCY_2 "\
procedure First\
{\
	x = 2;\
	z = 3;\
	call Second;\
}\
procedure Second\
{\
	x = 0;\
	i = 5;\
	while i\
	{\
		x = x + 2 * y;\
		if x then\
		{\
			if y then\
			{\
			}\
			call Second;\
		}\
		call Third;\
		i = i - 1;\
	}\
		if x then\
		{\
			x = x + 1;\
		}\
		else\
		{\
			z = 1;\
		}\
	z = z + x + i;\
	y = z + 2;\
	x = x * y + z;\
}\
procedure Third\
{\
	z = 5;\
	v = z;\
}"

/** This test consists of a program written such that there are no
newlines or tabs.
*/
#define PROGRAM_PARSER_TEST_CONSISTENCY_3 "procedure First{x=2;z=3;call Second;}procedure Second{x=0;i=5;while i{x=x+2*y;if x then{if y then{}call Second;}call Third;i=i-1;}if x then{x=x+1;}else{z=1;}z=z+x+i;y=z+2;x=x*y+z;}procedure Third {z=5;v=z;}"

#define PROGRAM_PARSER_TEST_IF_0 "if x then { y; }"
#define PROGRAM_PARSER_TEST_IF_1 "if x + 1 then { x = x + 1; }"
#define PROGRAM_PARSER_TEST_IF_2 "if avariable then { x = x + 1; }"
#define PROGRAM_PARSER_TEST_IF_3 "if ex+p-re*ss/on then { x = x + 1; }"


#endif